package com.huishu.commons.pojo;

import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 分页父类
 */
@Data
public class BasePage {

    /**
     * 当前页
     */
    private Integer currPage;

    /**
     * 页数量
     */
    private Integer pageSize;

    private Integer pageNum;

    /**
     * 搜索内容
     */
    private String search;


    public Integer getPageNum() {
        if (currPage != null) {
            return (currPage - 1) * pageSize;
        }
        return pageNum;
    }
}
